<template>
	<view class="report">
		<!-- 顶部导航 -->
		<diyNavBar value='举报维权'></diyNavBar>
		<view class="item" v-for="(item,index) in dataList" :key="index">
			<view class="box top">
				<text class="title">任务编号：{{item.task_id}}</text>
				<text class="name">{{$util.timestampToTime(item.create_time)}}</text>
			</view>
			<view class="box bottom">
				<text class="title">{{item.context}}</text>
				<text class="name">{{item.status?'已处理':'未处理'}}</text>
			</view>
		</view>
		<button type="default" class="btn"
		@click="$util.redirectTo('/pages/submissionreport/submissionreport')">举报维权</button>
		<!-- 加载 -->
		<loading-cover ref="loadingCover"></loading-cover>
	</view>
</template>

<script>
	import diyNavBar from '../../component/diy-nav/diy-navbar.vue'
	import loadingCover from '../../component/loading-cover/loading-cover.vue'
	export default{
		components:{diyNavBar,loadingCover},
		data(){
			return {
				dataList:[]
			}
		},
		onLoad(option) {

		},
		onShow() {
			this.$http.sendrequest('/reports/ReportsList',{},{
				tokenJudge:true
			}).then(res=>{
				if(res.code == 1) {
					this.dataList = res.data;
					this.$refs.loadingCover.hide();
				}
			})
		}
		
	}
</script>

<style lang="scss" scoped>
	.report{
		min-height: 100vh;
		background: $uni-content-background-color;
		font-family: PingFangSC-regular;
		.item{
			margin: 0 30rpx;
			padding: 46rpx 40rpx;
			box-sizing: border-box;
			background: #FFFFFF;
			border-radius: 20rpx;
			margin-top: 44rpx;
			.box{
				display: flex;
				align-items: center;
				justify-content: space-between;
			}
			.top{
				.title{
					font-size:26rpx;
					color: #101010;
				}
				.name{
					color: #999999;
					font-size: 24rpx;
				}
			}
			.bottom{
				margin-top: 20rpx;
				.title{
					font-size:24rpx;
					color: #999999;
				}
				.name{
					color: #FF6F30;
					font-size: 26rpx;
				}
			}
		}
		.btn{
			position: fixed;
			bottom: 100rpx;
			width: 630rpx;
			height: 90rpx;
			left: 50%;
			transform: translateX(-50%);
			text-align: center;
			line-height: 90rpx;
			color: #FFFFFF;
			font-size: 32rpx;
			font-weight: bold;
			border-radius: 90rpx;
			background: #FF6F30;
		}
	}
</style>
